package Java_Test;

import Test_3.Jiaouchu;

public class Jiaoche extends Car{


    public Jiaoche(String type, String brand, String idcard, int seat, double rent) {
        super(type, brand, idcard, seat, rent);
    }

    @Override
    public double discount(int days) {
        if (days>7&&days<=30){
            return this.getRent()*days*0.9;
        }else if (days>30&&days<=150){
            return this.getRent()*days*0.8;
        }else if (days>150){
            return days*this.getRent()*0.7;
        }else{}
        return this.getRent()*days;
    }


}
